The present disclosure relates to reconstruction of missing data in a time data sequence, and more specifically, to a method and an apparatus for generating data in a missing segment of a time data sequence.
In various situations, data may be generated constantly over time by some data generation mechanism, thereby forming a time data sequence. For example, in a city, electricity meter readings of a user are read on a regular basis (e.g., monthly) to charge electricity fare, and these electricity meter readings can form a time data sequence. For some reason, a segment (including one or more data) in the time data sequence may be missing. For example, if the user has been out for two months, his electricity meter readings for the two months may not be read, so that a corresponding segment (which includes two data) in the time data sequence indicating the user's electricity meter readings of respective months is missing, which renders that when the time data sequence is analyzed to obtain some information (such as a case where the user steals electricity), an accurate analysis result cannot be obtained. Therefore, when there is a missing segment in a time data sequence, it is necessary to reconstruct/generate the missing segment (i.e., data therein).
Some methods for generating data in a missing segment of a time data sequence have been proposed. For example, in one method, the data in the missing segment are calculated through linear interpolation based on data on both sides of the missing segment in the time data sequence. In another method, the data in the missing segment is set to an average value of the data on both sides of the missing segment. However, in a case where the missing segment includes more than two data, the data in the missing segment generated by these methods often do not conform to an actual condition of the time data sequence, and thus are not accurate.